﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLCMS.Business.DwzFrame;
using ZLCMS.Data.Model;
using ZLCMS.Business.Util;
using ZLCMS.Commands.User.Commands.Order;
using ZLCMS.Commands.Data;
using System.Collections;

namespace ZLCMS.Web.SystemManage.Basics.Shop.OrderReturns
{
    public partial class OrderRefundDetail : System.Web.UI.Page
    {
        protected FrameHelper _framePage;
        protected IDictionary OrderRefundData;
        protected OrderData OrderDt;
        protected void Page_Load(object sender, EventArgs e)
        {
            //初始化DWZ控件
            _framePage = new FrameHelper(this);

            //加载订单信息
            LoadOrderRefundDetailResult result = new LoadOrderRefundDetailCommand().Execute(new LoadOrderRefundDetailParameter()
            {
                RefundNo = Request["rno"],
                UserAccount = UserKit.GetUserAccount()
            }).Result;

            OrderRefundData = result.RefundData;
            OrderDt = result.Data;

            refund.DataSource = OrderRefundData["ProductList"];
            refund.DataBind();
        }
        protected string GetImageHtml(string jsonString)
        {
            string imgHtml = "";
            foreach (var item in FileKit.FileList(jsonString))
            {
                imgHtml += string.Format("<a class='prettyPhoto' title='{0}' href='{0}'>点击预览</a></br>", item.FilePath);
            }
            if (imgHtml=="")
            {
                imgHtml = "买家未上传相关凭证！";
            }
            return imgHtml;
        }
    }
}